<script setup>
import HelloWorld from "./components/HelloWorld.vue";
import { getName } from "@wujie/shared";
import { ref } from "vue";

const { $wujie } = window;
const input = ref();
const props = $wujie.props;

$wujie?.bus.$on("main-to-sub", (data) => {
  console.log("收到主应用的消息：", data);
});

$wujie?.bus.$emit("sub-to-main", { status: "success" });
console.log(getName());
</script>

<template>
  <div>
    <a href="https://vite.dev" target="_blank">
      <img src="/vite.svg" class="logo" alt="Vite logo" />
    </a>
    <a href="https://vuejs.org/" target="_blank">
      <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
    </a>
  </div>
  <el-input v-model="input" style="width: 240px" placeholder="Please input" />
  <el-button type="primary">1111</el-button>
  <!-- <HelloWorld msg="Vite + Vue" /> -->
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
